package cn.chenchendemospringboot.stock_demo.service.Impl;

import cn.chenchendemospringboot.stock_demo.entity.KafkaEventProcess;
import cn.chenchendemospringboot.stock_demo.mapper.KafkaEventProcessMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.List;

@Service
public class KafkaEventProcessImplMybatisPlus extends ServiceImpl<KafkaEventProcessMapper, KafkaEventProcess> {

    public boolean updateBatchById(List<KafkaEventProcess> kafkaEventProcessList) {

        if(CollectionUtils.isEmpty(kafkaEventProcessList)){
            System.out.println("----------------入参为空----------------------");
            return false;
        }
        // 使用 MyBatis-Plus 的 updateBatchById 方法批量更新实体类列表
        return super.updateBatchById(kafkaEventProcessList);
    }

}
